/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

//获取模板下拉
export function getContractTypeDict(query){
  return request({
    url: '/bonus/bonustemplatemain/getContractTypeDict',
    method: 'get',
    params: query
  })
}
// 保存校验
export function isExsitContractType(data) {
  return request({
    url: '/appr-contract/hetongacttemplate/isExsitContractType',
    method: 'post',
    data: data
  })
}
// isExsitTemplateName
export function isExsitTemplateNamejy(data) {
  return request({
    url: '/appr-contract/hetongacttemplate/isExsitTemplateName',
    method: 'post',
    data: data
  })
}
export function copyTemplateMainAndDetail(data) {
  return request({
    url: '/bonus/bonustemplatemain/copyTemplateMainAndDetail',
    method: 'get',
    params: data
  })
}

// 自定义流程提交
export function submitStatusAllfn(query){
  return request({
    url: '/appr-contract/hetongzbnd/submitStatusAll',
    method: 'post',
    data: query
  })
}
// 校验模板
export function isExsitContractTypeForNd(query){
  return request({
    url: '/appr-contract/hetongacttemplate/isExsitContractTypeForNd',
    method: 'post',
    data: query
  })
}
// 模板保存
export function saveTemplate(query){
  return request({
    url: '/appr-contract/hetongacttemplate/saveTemplate',
    method: 'post',
    data: query
  })
}
//模板分页
export function getemPage(query){
  return request({
    url: '/appr-contract/hetongacttemplate/page',
    method: 'get',
    params: query
  })
}
//模板删除
export function deleteBatch(query){
  return request({
    url: '/bonus/bonustemplatemain/deleteBatch',
    method: 'get',
    params: query
  })
}
// 获取模板名称列表 hetongcjacttemplatemain/page
export function tempage(query){
  return request({
    url: '/bonus/bonustemplatemain/page',
    method: 'get',
    params: query
  })
}
// 新增模板校验
export function isExsitTemplateName(query){
  return request({
    url: '/bonus/bonustemplatemain/isExsitTemplateName',
    method: 'get',
    params: query
  })
}
// 新增模板
export function saveTemplateName(query){
  return request({
    url: '/bonus/bonustemplatemain/saveTemplate',
    method: 'post',
    data: query
  })
}
// 获取合同创建中的模板列表
export function getTempList(query){
  return request({
    url: '/bonus/bonustemplatedetail/getTempList',
    method: 'get',
    params: query
  })
}
// 获取合同创建中的模板列表
export function getTempListForZdrw(query){
  return request({
    url: '/bonus/bonustemplatedetail/getTempListForZdrw',
    method: 'get',
    params: query
  })
}
// 失去焦点保存
export function saveTemplatehang(data) {
  return request({
    url: '/bonus/bonustemplatedetail/saveTemplate',
    method: 'post',
    data: data
  })
}

// 失去焦点保存
export function saveTemplateUser(data) {
  return request({
    url: '/bonus/bonustemplatedetail/saveTemplateUserList',
    method: 'post',
    data: data
  })
}

// 提交模板有效性
export function effective(data) {
  return request({
    url: '/bonus/bonustemplatemain/getEffectiveTemplate',
    method: 'get',
    params: data
  })
}
// hetongcjacttemplatedetail/getStepInfo
export function getStepInfo(data) {
  return request({
    url: '/appr-contract/hetongcjacttemplatedetail/getStepInfo',
    method: 'get',
    params: data
  })
}
// 模板shanchu
export function deleteBatchtem(data) {
  return request({
    url: '/bonus/bonustemplatemain/deleteBatch',
    method: 'get',
    params: data
  })
}
// 指标拟定-->推送到其他合同
export function pageByTs(query) {
  return request({
    url: '/appr-contract/hetongzbnd/pageByTs',
    method: 'get',
    params: query
  })
}
// 指标拟定-->指标 推送到其他合同
export function tsZhibiaoToNiDing(query) {
  return request({
    url: '/appr-contract/hetongzbnd/tsZhibiaoToNiDing',
    method: 'post',
    data: query
  })
}

export function tsZhibiaoToHetong(query) {
  return request({
    url: '/appr-contract/hetonghtcj/tsZhibiaoToHetong',
    method: 'post',
    data: query
  })
}
export function alldepeuser(query) {
  return request({
    url: '/bonus/bonustemplatemain/alltree',
    method: 'get',
    params: query
  })
}

export function mydept(query) {
  return request({
    url: '/bonus/bonustemplatemain/getMyDept',
    method: 'get',
    params: query
  })
}

export function getNodeInfo(proId) {
  return request({
    url: '/bonus/rckhsjtask/getCurrentTask/' + proId,
    method: 'get'
  })
}

export function getSjNodeInfo(proId) {
  return request({
    url: '/bonus/rckhKpiTaskList/getCurrentTask/' + proId,
    method: 'get'
  })
}

export function changeAss(query){
  return request({
    url: '/bonus/rckhsjtask/changeAss',
    method: 'get',
    params: query
  })
}

export function putObjstateChange(data) {
  return request({
    url: '/bonus/bonustemplatemain/setZmb',
    method: 'post',
    data: data
  })
}
// 获取选泽人员的树列表
export function getTreeAll(query){
  return request({
    url: '/bonus/bonuspartialschemereview/getTreeAll',
    method: 'get',
    params: query
  })
}
// 失去焦点保存
export function saveTemplateUserList(data) {
  return request({
    url: '/bonus/bonustemplatedetail/saveTemplateUserList',
    method: 'post',
    data: data
  })
}

export const  radioTwoList=[
  {value:'-1',name:'全部'},
  {value:'1',name:'本部'},
  {value:'0',name:'所属机构'}
]


